<script setup>
    const props =defineProps({
        car:String,
        money:Number
    })
    console.log(props);
    
    const emit = defineEmits(['changeMoney'])
    const buy = ()=>{
        emit('changeMoney',5)
    }
    

</script>

<template>
    <div>我是子组件--{{car}}--{{ money }}</div>
    <button @click="buy">sendMsg</button>
</template>

<style scoped>
</style>
